home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / CHASSIS_ / MYGLOBAL.C < prev    next >
Text File  |  1992-05-17  |  4KB  |  97 lines

  1. /************************************************************************************/
  2. /*    MyGlobals.c                                                                        */
  3. /*                                                                                    */
  4. /*  See also MyHeaders.h                                                            */
  5. /************************************************************************************/
  6.  
  7. #include "MyHeaders.h"
  8.  
  9. /**************************                                                         */
  10. /*    GLOBAL VARIABLES      *                                                         */
  11. /**************************                                                         */
  12. int            MainRetCode;                        /* main program return code            */
  13. int            WorkRetCode;                        /* work return code                    */
  14. int            j,k,l,m,n;                            /* work variables                    */
  15. long        worklong;                            /* work variable                    */
  16. Rect        workRect;                            /* work variable                    */
  17. int            workInt;                            /* work variable                    */
  18. Handle        workHandle;                            /* work variable                    */
  19. Point        workPoint;                            /* work variable                    */
  20. char        workChar;                            /* work variable                    */
  21. TEHandle    workTEHandle;                        /* work variable                    */
  22. ControlHandle    workControlHandle;                /* work variable                    */
  23. Str255        workStr255;                            /* work variable                    */
  24. Boolean        workBoolean;                        /* work variable                    */
  25. GrafPtr        workGrafPtr;                        /* work variable                    */
  26.                                                                                        
  27. EventRecord        myEvent;                        /* from event loop                    */
  28. int                myQuitFlag;                        /* flag to get out of event loop    */
  29.  
  30. WindowPtr        workWindowPtr;                    /* pointer from FindWindow            */
  31. int                myMouseWhere;                    /* location (not Point) of mouse    */
  32.  
  33. char            testChar;                        /* character for boolean operations    */
  34.  
  35. MenuInfo         **myMenuHandle[4];                /* handles for various menus        */
  36. Str255            menuItemName;                    /* name returned from menu select    */
  37. int                mymenuID;                        /* menu ID from MenuSelect            */
  38. int                mymenuItem;                        /* menu item number from MenuSelect    */
  39.  
  40. DialogPtr        myDlogPtr;                        /* pointer to active dialog            */
  41. DialogTemplate    myDTmpl,**myDTmplH;                /* template for active dialog        */
  42.  
  43. AlertTemplate    myATmpl,**myATmplH;                /* template for active Alert        */
  44.  
  45. struct    wTblStruct                                /* space for some window info        */
  46.         windTbl[windMax];                        /* table of many of the above        */
  47. int                windSub;                        /* subscript for window table        */
  48.  
  49. int                myResRefNum;                    /* application res file ref num        */
  50. int                initResRefNum;                    /* res file ref num after inits        */
  51.  
  52. Rect            myDragRect;                        /* outer bounds for dragging        */
  53.  
  54. Point            nextTextPosit;                    /* Position of next text window        */
  55.  
  56. Rect            destRect;                        /* for calculations of TE areas        */
  57. Rect            viewRect;                        /* for calculations of TE areas        */
  58. RgnHandle        workRegionH;                    /* work handle for TE redraw        */
  59.  
  60. WindowPtr        mouseWindPtr;                    /* pointer to window with cursor    */
  61. Point            locMouse;                        /* local coords of mouse            */
  62. Point            gMouse;                            /* global coords of mouse            */
  63. int                mouseWindPart;                    /* part code in window                */
  64.  
  65. SFReply            workReply;                        /* work area for std file reply        */
  66. int                workRC;                            /* work area for open return code    */
  67. int                workPathRefNum;                    /* work area path ref num from open    */
  68.  
  69. int                appMessage;                        /* startup message from Finder        */
  70. int                appCount;                        /* number of docs from Finder        */
  71. AppFile            appTheFile;                        /* file information from Finder        */
  72. long            appMenuLong;                    /* menu longword for menu proc        */
  73. int                appIndex;                        /* index pointer for GetAppFiles    */
  74.  
  75. THPrint            prRecHdl;                        /* handle to print record            */
  76. TPPrPort        prPortPtr;                        /* pointer to print port            */
  77.  
  78. Boolean            useColor;                        /* should we use color windows, etc    */
  79.  
  80. Handle            theSnd;                            /* handle to sound resource            */
  81. OSErr            sndRC;                            /* return code from SndPlay            */
  82. Ptr                theSndChan;                        /* sound channel                    */
  83.  
  84. ScrapStuff        *scrapPtr;                        /* pointer to desk scrap            */
  85. long            scrapOffset;                    /* offset from beginning of scrap    */
  86.  
  87. ListHandle        helpList;                        /* handle for List Manager            */
  88. Point            helpCell = {0, 0};                /* cell for List Manager            */
  89. long            helpLong;                        /* for help facility                */
  90. Rect            helpRect = {26,164, 214,398};    /* for help facility                */
  91. Handle            helpHandle;                        /* work handle for help                */
  92. int                helpPrev = -1;                    /* previously selected help item    */
  93.  
  94. struct            versRec                            /* vers resource                    */
  95.                 **versRecHandle;
  96. Str255            versLongStr;                    /* long string from vers resource    */
  97.